<html>
 <head>
    <title>[var.TITLE]</title>
    <link href="[var.ROOT_CSS_DIR]/main.css" rel="STYLESHEET" type="text/css" charset="iso-8859-1" hreflang="en-us">
    <link href="[var.ROOT_CSS_DIR]/facet/style.css" rel="STYLESHEET" type="text/css" charset="iso-8859-1" hreflang="en-us">
    <script type="text/javascript" src="[var.ROOT_DIR]js/common.js"></script>
    <script type="text/javascript" src="[var.ROOT_DIR]js/doiMenuDOM.js"></script>
    <script type="text/javascript" src="[var.ROOT_DIR]js/functions.js"></script>
    <script type="text/javascript" src="[var.ROOT_DIR]js/jsmenu.php"></script>
    <script type="text/javascript" src="[var.ROOT_DIR]js/jsmenu.cfg"></script>
    <script type="text/javascript" src="[var.ROOT_DIR]js/jsformgrid.php?session=[var.SessionVar]"></script>
    <script type="text/javascript" src="[var.ROOT_DIR]js/jsmasks.js"></script>
    <script type="text/javascript" src="[var.ROOT_DIR]js/jsverify.php?session=[var.SessionVar]"></script>
    <script type="text/javascript" src="[var.ROOT_DIR]js/jsinit.php?session=[var.SessionVar]"></script>
    <script type="text/javascript" src="[var.ROOT_DIR]js/jquery.min.js"></script>
 </head>
 <body bgcolor="FFFFFF" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0"> 
    <table border="0" cellspacing="0" cellpadding="0" width="100%" align="[var.POSITION]">
        <tr>
            <td>[tbs_include.onshow;file=[var.HTMLHeader];getob;]</td>
        </tr>
        <tr>
            <td>
            <table border="0" cellspacing="0" cellpadding="0" width="100%">
                <tr>
                    <td class="mainmenu2"><img src="images/spacer.gif" height="1" width="1"></td>
                </tr>
                <tr>
                    <td background="[var.ROOT_IMG_DIR]/back-menu.gif">
                    <table border="0" cellspacing="0" cellpadding="0" width="100%">
                        <tr>
                            <td>
                                <script language="JavaScript" type="text/JavaScript">menu.Build();</script>
                          </td>
                          <td class="head-login">Login as [var.USERPROFILE_NAME]</td>
                        </tr>
                      </table>
                    </td>
                </tr>

                <tr>
                    <td class="mainmenu2"><img src="images/spacer.gif" height="1" width="1"></td>
                </tr>
            </table>
            </td>
        </tr>
        <tr height="100%">
            <td>
            <table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
                <tr valign="top">
                    <td width="100%">
                        <table border="0" cellspacing="0" cellpadding="0" width="100%">
                            <tr>
                                <td class="head-path"></td>
                                <td class="corner-date">[var.CORNER_DATE]</td>
                            </tr>
                        </table>
                        <table border="0" cellspacing="0" cellpadding="5" width="100%">
                            <tr>
                                <td class="FacetHeaderContent" >.:[var.SubHeaderTitle]:.</td>
                            </tr>
                        </table>

                        <table border="0" cellspacing="0" cellpadding="5" width="100%">
                        <form method="post" action="[var.FormAction]" name="[var.HTMLFormName]" enctype="multipart/form-data">
                            <tr>
                                <td class="contentTitleOperational">
                                Menu
                                </td>
                            </tr>
                            <tr>
                                <td class="contentOperational">
                                <table cellspacing="2" cellpadding="0">
                                 <tr>
                                   <td>
                                    <input type="button" name="Action" value="<<Back" class="button" onClick="self.location.replace('[sys.script_name]?PageMode=Form&jo_id=[var.jo_id]')">
                                   </td>
                                   <td>
									 <input name="FormAction" type="submit" value="Save" class="button" ONCLICK="return checkVerification();">
								   </td>
                                   <td>
                                     <input type="button" name="Action" value="Done" class="button" onClick="self.location.replace('[var.SERVER_URL]')">
                                   </td>
                                   <!--
                                   <td>
									 <input type="button" name="Action" value="Print to PDF" class="button" onClick="return SubmitPDF();">
								   </td>
								   -->
                                 </tr>
                                </table>
                                </td>
                            </tr>
                            <tr>
                                <td class="contentOperational">
                         
                       
                        
                         <!--TABLE MASTER 3-->       
						 <table width="1390" border="0">
							
						 
                          <tr>
							 <!--ROW TABLE MASTER 4--> 
								 <td valign="top"> 
                                 <!--COL TABLE MASTER 4-->  
                          
                          
                            <!--GRID-->
                             
							<hr size="1" color="DFDFDF">
							<div id="spanHeader" style="height: 25px; vertical-align: top; overflow-y: noscroll;">
							<table border="0" width="40%" cellpadding="3" cellspacing="1" class="FacetFormTABLEOperational" align="left">

									<tr>
											<td nowrap class="FacetColumnTDOperational" align="center" width="35">X</td>
											<td nowrap class="FacetColumnTDOperational" align="center" width="40">No.</td>
											<td nowrap class="FacetColumnTDOperational" align="center">File</td>
				
									</tr>
							</table>
							</div>




							<div id="spanDetail" class="tariffgrid" style="height: 200px; vertical-align: top; overflow: auto;">

								<!--Edited by van Smith-->

								<table border="0" width="40%" cellpadding="3" cellspacing="1" class="FacetFormTABLEOperational" align="left">

									<tr id="[blg.#]" style="display:[blg._display;noerr]">

											<td nowrap class="FacetDataTDOperational" align="center" width="35">
											  <input type="checkbox" name="txtCheck[blg.#]" value="[blg.upload_doc_id;noerr]" class="inputRadio">
											  <input type=hidden name="dk[blg.#]" value="D">
											</td>
											
											<td nowrap class="FacetDataTDOperational" align="center" width="40" align="right">											   
											  <input type="text" name="no[blg.#]" class="gridBox" id="input" value="[blg.#;block=tr]." size="3">
											  <input type="hidden" name="jo_id[blg.#]" value="[tbs_check;if [var.jo_id;noerr]!='';then [var.jo_id;noerr] ;else '']">
											</td>
																					 
											<td nowrap class="FacetDataTDOperational" align="center">
											    
											    [tbs_check;htmlconv=no;if [blg.file_upload]!='';then 
                                                '<a href="[var.ServerURL]/[var.ROOT_UPLOAD_DIR]/[var.uploadDirModule]/[blg.file_upload;noerr]">[blg.file_upload;block=tr;]</a>' ;selected;noerr]
                                                
                                                [tbs_check;htmlconv=no;if [blg.file_upload]=='';then 
                                                '<input type="file" name="file_upload[blg.#]">' ;selected;noerr]
											   
											</td>
											
											
											
										</tr>
								</table>

								<!--End Edited by van Smith-->

							</div>

							<!--END GRID-->
                          
                          
                          </td>
                          <!--END COL TABLE MASTER 4-->  
                                
                          
                          </tr>
                          <!--END ROW TABLE MASTER 4-->     
                          
                          
                             
                             
                            
                        </table>
                        <!--END TABLE MASTER 4-->
                        
                        


                        <!--BUTTON-->
                        <div id="spanButton" style="height: 35px; vertical-align: top; overflow-y: noscroll;">
                        <table border="0" width="100%" cellpadding="3" cellspacing="1" class="FacetFormTABLEOperational" align="left">
                                <tr>
                                    <td align="right" class="FacetColumnTDOperational">

                                           <table border="0" cellspacing="2" cellpadding="0">
                                                   <tr>
                                                           <td>
                                                             <input name="FormAction" type="button" value="Next Line" class="button" onClick="return (AddFormGridProject(this,'[var.HTMLFormName].no'))">
                                                           </td>
                                                           <td>
                                                             <input name="FormAction" type="button" value="Delete File" class="button" onClick="if (confirm('Are you sure want to Delete Selected File ?')) {[var.HTMLFormName].action='[sys.script_name]?FormAction=delete_file&PageMode=uploadFile&jo_id=[var.jo_id]';[var.HTMLFormName].submit();}">
                                                           </td>
                                                           <td>
                                                             <input name="FormAction" type="submit" value="Save" class="button" ONCLICK="return checkVerification();">
                                                           </td>
                                                          
                                                           <td>
                                                             <input name="FormAction" type="submit" value="Cancel" class="button" onClick="self.location.replace('[sys.script_name]')">
                                                           </td>
                                                   </tr>
                                           </table>


                                    </td>
                                        </td>
                                </tr>

                        </table>
                        </div>

                        <!--END BUTTON-->


                    </td>
                </tr>

                </form>

            </table>
            </td>
        </tr>
        <tr>
            <td>
            <br>
            <table border="0" cellspacing="0" cellpadding="0" width="100%">
                <tr>
                    <td class="footer1"><img src="images/spacer.gif" height="1" width="1"></td>
                </tr>
                <!--tr>
                    <td class="footer2">Prototype Test - Web Application</td>
                </tr-->
            </table>  
            </td>
        </tr>
    </table>
 </body>


 <iframe width="174" height="189" name="gToday:normal:agenda.js" id="gToday:normal:agenda.js" src="[var.ROOT_DIR]js/Calendar/pop/ipopeng.htm" scrolling="no" frameborder="0" style="LEFT: -500px; POSITION: absolute; TOP: 0px; VISIBILITY: visible; Z-INDEX: 999"></iframe>

 <script>
 [var.InitFunction]


function IsNumeric(sText)
{
   var ValidChars = "0123456789.,";
   var IsNumber=true;
   var Char;

 
   for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
      }
   return IsNumber;
   
}


function checkVerification()
{
	var checksum = 0;
	var errorMsg = "";
	
	    
    return true;
	
}


 function DeleteLines(){
    $("input[name^=txtCheck]").each(
      function(){
        if($(this).attr('checked')) {
            //alert($(this).val());
            var num = String($(this).attr('name')).replace('txtCheck','');
            //alert('num: ' + num);
            $('tr#'+num).remove();
        }
      }
    );
 }
 
 



function SubmitPDF() {	
	  str_url = '[sys.script_name]?PageMode=PDF&jo_id=[var.jo_id]';
	  OpenPDF(str_url);
	  return false;	
}


 function GetStaff(val,need_another_var) {
            newwin = window.open("ais_transaction_stafflist.php?FormName=[var.HTMLFormName]&need_another_var="+need_another_var,"toolcalc","height=400,width=640,noscroll,resizable");
 }


 function GetServices(val,no_urut) {
      newwin = window.open("ais_transaction_serviceslist.php?FormName=[var.HTMLFormName]&no_urut="+no_urut,"toolcalc","height=400,width=640,noscroll,resizable");
 }
 
  function GetReceived(val,no_urut) {
      newwin = window.open("ais_transaction_custlist_2.php?FormName=[var.HTMLFormName]&no_urut="+no_urut,"toolcalc","height=400,width=640,noscroll,resizable");
 }



var reccount = 1;
//if (reccount==0) reccount=1; else reccount=5;
var last;

function AddFormGridProject (cname,firstelemen) {
	var lastname ="";
    if (VerifyGridProject(reccount)==false) {
        return false
    }

    $(".gridBox:visible").each(function(n) {
        n = n+1;
        reccount = n;
        lastname = this.name;
    });
    
    lastname = lastname.substring(2);
    
    lastname = parseInt(lastname)+1;
    
    //reccount = 5;
    reccount = parseInt(reccount)+1;

    //alert("reccount: " + reccount);

    if (reccount>=100) {
        cname.disabled = true;
    }

    var objrow = document.getElementById(lastname);

    if (objrow.style.display == 'none') {
        objrow.style.display = '';
    }

    eval(firstelemen+''+lastname+'.focus()');

    return false;
}


function VerifyGridProject (x) {
    err_message = '';
    last_focus =0;
    if (err_message.length) {//alert(err_message);
    return false} else return true
}


function CheckAllGrid(firstelemen) {
        for (n=1;n<reccount;n++) {
                if (!VerifyGrid(n)) return false;
        }
        eval('fl = document.'+firstelemen+reccount+'.value');
        if (fl.length)
                if (!VerifyGrid(reccount)) return false;
return true;}

 

 </script>


</html>
